<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateCalendarTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_serviceId}" for="serviceId" />
                    <h:inputText id="serviceId" value="#{calendarController.selected.serviceId}" title="#{bundle.CreateCalendarTitle_serviceId}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_serviceId}"/>
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_monday}" for="monday" />
                    <h:inputText id="monday" value="#{calendarController.selected.monday}" title="#{bundle.CreateCalendarTitle_monday}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_monday}"/>
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_tuesday}" for="tuesday" />
                    <h:inputText id="tuesday" value="#{calendarController.selected.tuesday}" title="#{bundle.CreateCalendarTitle_tuesday}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_tuesday}"/>
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_wednesday}" for="wednesday" />
                    <h:inputText id="wednesday" value="#{calendarController.selected.wednesday}" title="#{bundle.CreateCalendarTitle_wednesday}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_wednesday}"/>
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_thursday}" for="thursday" />
                    <h:inputText id="thursday" value="#{calendarController.selected.thursday}" title="#{bundle.CreateCalendarTitle_thursday}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_thursday}"/>
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_friday}" for="friday" />
                    <h:inputText id="friday" value="#{calendarController.selected.friday}" title="#{bundle.CreateCalendarTitle_friday}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_friday}"/>
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_saturday}" for="saturday" />
                    <h:inputText id="saturday" value="#{calendarController.selected.saturday}" title="#{bundle.CreateCalendarTitle_saturday}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_saturday}"/>
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_sunday}" for="sunday" />
                    <h:inputText id="sunday" value="#{calendarController.selected.sunday}" title="#{bundle.CreateCalendarTitle_sunday}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_sunday}"/>
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_startDate}" for="startDate" />
                    <h:inputText id="startDate" value="#{calendarController.selected.startDate}" title="#{bundle.CreateCalendarTitle_startDate}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_startDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateCalendarLabel_endDate}" for="endDate" />
                    <h:inputText id="endDate" value="#{calendarController.selected.endDate}" title="#{bundle.CreateCalendarTitle_endDate}" required="true" requiredMessage="#{bundle.CreateCalendarRequiredMessage_endDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{calendarController.create}" value="#{bundle.CreateCalendarSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{calendarController.prepareList}" value="#{bundle.CreateCalendarShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateCalendarIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
